package basic5;

import java.util.*;

public class J05_52 {

	public static void main(String[] args) {
	
		int k;
		System.out.print("숫자를 입력하세요. : ");
	Scanner sc=new Scanner(System.in);
	k= sc.nextInt();
	

		for (int i = 1; i <= k; ++i) {

			for (int j = k; j >= 1; --j) {
				if (j > i)
					System.out.print("  ");
				else
					System.out.print(j + " ");

			}
			for (int b = 1; b <= i-1; ++b) {

				
				System.out.print(b+1 + " ");
			}
			System.out.println("");
		
		}


	}
}